{extend name="pc/admin/layout"/}
{block name="main"}
   <div class="g-1400 g-container" id="pjax-container">
        
<div class="bg-bai b rx3" id="vue-page">
<form id="form-config">
    <div class="t-v t-t">
        <div class="c-sidebar c-sidebar-h pb5 br">
            <div class="c-sidebar-title t-v hui bb">支付相关设置</div>
            <ul class="c-nav click-nav">
                <li><a href="{:url('pc/admin',['act'=>'pay','s'=>'e'])}" class="t-v" data-pjax>
                    <div><i class="icon icon-form"></i></div>
                    <div>支付配置</div>
                </a></li>
				<li class="active"><a href="{:url('pc/admin',['act'=>'pay','s'=>'o'])}" class="t-v" data-pjax>
                    <div><i class="icon icon-form"></i></div>
                    <div>订单列表</div>
                </a></li>
				<li><a href="{:url('pc/admin',['act'=>'pay','s'=>'vip'])}" class="t-v" data-pjax>
                    <div><i class="icon icon-form"></i></div>
                    <div>VIP价格</div>
                </a></li>
				<li><a href="{:url('pc/admin',['act'=>'pay','s'=>'daili'])}" class="t-v" data-pjax>
                    <div><i class="icon icon-form"></i></div>
                    <div>代理价格</div>
                </a></li>
				<li><a href="{:url('pc/admin',['act'=>'pay','s'=>'peie'])}" class="t-v" data-pjax>
                    <div><i class="icon icon-form"></i></div>
                    <div>配额价格</div>
                </a></li>
				<li><a href="{:url('pc/admin',['act'=>'pay','s'=>'fz'])}" class="t-v" data-pjax>
                    <div><i class="icon icon-form"></i></div>
                    <div>分站价格</div>
                </a></li>
            </ul>
        </div>
<div class="c-content bl">
            <div class="g-title t-v pl4 bb">
				<div class="col-8 h t-v bold">订单列表</div>
				<div class="col-4 t-v t-r">
                    <div class="g-search in-text w22 b b-hui mr5">
                        <dd><input type="text" class="form form-md pl4 pr4" v-model="search.orderid" placeholder="输入订单号进行搜索" value=""></dd>
                        <dt>
                            <button type="button" class="btn btn-bai btn-md pl5 pr6 bl" @click="search.page=1;loadList()"><i class="icon icon-search"></i></button>
                        </dt>
                    </div>
                </div>
			</div>
                <table class="table table-hover">
                    <thead>
                    <th>商品交易号</th>
                    <th>商品订单号</th>
                    <th>商品名称</th>
                    <th>订单金额</th>
                    <th>支付方式</th>
                    <th>支付时间</th>
                    <th>状态</th>
                    </thead>
                    <tbody>
                    <tr v-for="row in list">
                        <td>{{row.trade_no}}</td>
                        <td>{{row.orderid}}</td>
                        <td>{{row.name}}</td>
                        <td>{{row.money}}</td>
                        <td>{{row.type}}</td>
                        <td>{{row.time}}</td>
                        <td v-if="parseInt(row.status)===0" class="hong">未支付</td>
                        <td v-else class="lv">已支付</td>
                    </tr>
                    </tbody>
                </table>
        </div>
</div>
</form>
<div class="c-pagination o-h t-v">
        <div class="c-sidebar"></div>
        <div class="c-content h11 o-h g-btn t-v bt bl">
		<div class="col-12 h no g-btn g-minhide t-v t-r">
			<pagination ref="pagination" :total="total" :current_page="search.page" :page_size="search.pageSize"
                            @page-phange="pageChange"></pagination>
        </div>
		</div>
    </div>
</div>

    </div>
   {/block}
   {block name='foot'}
		<script>
        new Vue({
            el: '#vue-page',
            data: {
                search: {
                    page: 1,
                    pageSize: 10,
                    type: '',
                    orderid: null,
                    trade_no: null
                },
                total: 0,
                list: []
            },
            methods: {
                pageChange: function (p) {
                    this.search.page = p;
                    this.loadList();
                },
                loadList: function () {
                    this.$refs.pagination.setCurrent(this.search.page);// 改变页码
                    var vue = this;
                   app.ajax("{:url('admin_ajax/orderList',['action'=>'list'])}", this.search, function (data) {
                        if (data.code === 0) {
                            vue.total = data.total;
                            vue.list = data.list;
                        } else {
                           x.msg(data.message);
                        }
                    })
                },
            },
            mounted: function () {
                this.loadList();
            }
        })
    </script>
    {/block}